package com.neusoft.feign;

import com.neusoft.core.Food;
import org.springframework.stereotype.Component;
import com.neusoft.core.CommonResult;

import java.util.ArrayList;
import java.util.List;

@Component
public class FoodFeignClientCallBack implements FoodFeignClient{
    @Override
    public CommonResult<List<Food>> listFoodByBusinessId(Food food) {
        //返回降级响应（食品信息返回null）
        return new CommonResult<>(403,"fegin触发了熔断降级",new ArrayList<Food>());
    }
}
